package com.wang.designpattern.state;

public class Client {

    public static void main(String[] args) {
        RaffleActivity activity = new RaffleActivity(3);

        for (int i=0; i<30; i++) {
            System.out.println("第 " + (i+1) + " 次抽奖---------------");
            if (activity.getCount() > 0) {
                // 参加抽奖，第一步扣除积分
                activity.debuctMoney();
                // 第二步抽奖
                activity.raffle();
            } else {
                System.out.println("很遗憾，奖品发放完了");
                break;
            }
        }
    }
}
